<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    #mian{ width: 500px;border: #0000ff 1px solid ;margin: auto}
    .text{width: 400px;margin-left: 150px;}
</style>
<body>
<div id="mian">
    <div class="text">
        <h1>修改信息</h1>
        <p>用户名:</p>
        <form method="post" onsubmit="return check()" name="registerForm" action="${pageContext.request.contextPath}/ClassMessage?method=updateClass&cid=${requestScope.classGrade.cid}" >
            班级:  <input type="text" name="class" value="${requestScope.classGrade.className}"><br/><br/>
            年级:  <input type="text" name="grade" value="${requestScope.classGrade.grade}"><br/><br/>
            班主任:  <input type="text" name="chairman" value="${requestScope.classGrade.chairman}"><br/><br/>
            口号:  <input type="text" name="slogan" value="${requestScope.classGrade.slogan}"><br/><br/>
            人数:  <input type="text" name="count" value="${requestScope.classGrade.count}"><br/><br/>

            &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input  type="submit" value="提交" ><br/>

        </form>
    </div>
</div>
</body>
</html>
<script>
    function check() {

        if (registerForm.name.value == "") {
            alert("姓名必须输入！");
            registerForm.name.focus(); //获得焦点
            return false;
        }
        return true;  //未验证出错误时
    }
</script>